Skip to content

Conversation

@Yorkxe
Copy link
Contributor

@Yorkxe Yorkxe commented Nov 11, 2025

No description provided.

"This instance of :c:type:`PyTypeObject` represents the Python tuple type; it "
"is the same object as :class:`tuple` in the Python layer."
msgstr ""
msgstr "此 :c:type:`PyTypeObject` 實例代表 Python 元組型別,與 Python layer 中的"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Python layer 翻譯成「Python 層」?

"Return a new tuple object of size *len*, or ``NULL`` with an exception set "
"on failure."
msgstr ""
msgstr "回傳一個長度為 *len* 的新元組物件,當例外發生時回傳 ``NULL``"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
msgstr "回傳一個長度為 *len* 的新元組物件,當例外發生時回傳 ``NULL``"
msgstr "回傳一個長度為 *len* 的新元組物件,失敗時會回傳 ``NULL`` 並設定例外。"

Comment on lines +61 to +62
msgstr "回傳一個長度為 *len* 的新元組物件,當例外發生時回傳 ``NULL``。元組值被初始化為"
"指向 Python 物件的後續 *n* 個 C 參數。``PyTuple_Pack(2, a, b)`` 等價於"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
msgstr "回傳一個長度為 *len* 的新元組物件,當例外發生時回傳 ``NULL``。元組值被初始化為"
"指向 Python 物件的後續 *n* 個 C 參數。``PyTuple_Pack(2, a, b)`` 等價於"
msgstr "回傳一個長度為 *n* 的新元組物件,失敗時會回傳 ``NULL`` 並設定例外。元組值被初始化為"
"指向 Python 物件的接續 *n* 個 C 引數。``PyTuple_Pack(2, a, b)`` 等價於"

Comment on lines +68 to +69
"error, return ``-1`` and with an exception set."
msgstr "拿取一個元組物件的指針,然後回傳此元組的大小。錯誤發生時,回傳 ``-1``。"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

不要改到原文

Suggested change
"error, return ``-1`` and with an exception set."
msgstr "拿取一個元組物件的指針,然後回傳此元組的大小。錯誤發生時,回傳 ``-1``。"
"error, return ``-1`` with an exception set."
msgstr "拿取一個元組物件的指標,然後回傳此元組的大小。錯誤發生時,回傳 ``-1`` 並設定例外。"

#: ../../c-api/tuple.rst:56
msgid "Like :c:func:`PyTuple_Size`, but without error checking."
msgstr ""
msgstr "就像 :c:func:`PyTuple_Size` 但沒有異常檢查。"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
msgstr "就像 :c:func:`PyTuple_Size` 但沒有異常檢查。"
msgstr "就像 :c:func:`PyTuple_Size` 但沒有錯誤檢查。"

#: ../../c-api/tuple.rst:208
msgid "The type was changed from ``char *``."
msgstr ""
msgstr "型別已被 ``char *`` 修改。"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
msgstr "型別已被 ``char *`` 修改。"
msgstr "型別原本是 ``char *``,現已被修改。"

msgid ""
"Return the object at position *pos* in the struct sequence pointed to by *p*."
msgstr ""
msgstr "回傳結構體序列中由 *p* 指向 *pos* 處的物件。"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
msgstr "回傳結構體序列中由 *p* 指向 *pos* 處的物件。"
msgstr "回傳結構序列中由 *p* 指向 *pos* 處的物件。"

#: ../../c-api/tuple.rst:232
msgid "Now implemented as an alias to :c:func:`PyStructSequence_GetItem`."
msgstr ""
msgstr "現在以 :c:func:`PyStructSequence_GetItem` 的別名型式實現。"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
msgstr "現在以 :c:func:`PyStructSequence_GetItem` 的別名型式實現。"
msgstr "現在是被實作為 :c:func:`PyStructSequence_GetItem` 的一個別名。"

Comment on lines +289 to +290
msgstr "將結構體序列 *p* 中索引 *pos* 處的欄位值設為 *o*。與 "
":c:func:`PyTuple_SET_ITEM` 類似,此函數僅套用於填充全新實例。"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
msgstr "將結構體序列 *p* 中索引 *pos* 處的欄位值設為 *o*。與 "
":c:func:`PyTuple_SET_ITEM` 類似,此函數僅套用於填充全新實例"
msgstr "將結構序列 *p* 中索引 *pos* 處的欄位值設為 *o*。與 "
":c:func:`PyTuple_SET_ITEM` 類似,此函式僅套用於填充全新實例"

#: ../../c-api/tuple.rst:254
msgid "Now implemented as an alias to :c:func:`PyStructSequence_SetItem`."
msgstr ""
msgstr "現在以 :c:func:`PyStructSequence_SetItem` 的別名實現。"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
msgstr "現在以 :c:func:`PyStructSequence_SetItem` 的別名實現。"
msgstr "現在是被實作為 :c:func:`PyStructSequence_SetItem` 的一個別名。"

@mattwang44 mattwang44 linked an issue Nov 12, 2025 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Translate c-api/tuple.po

2 participants